<div id="group_list" class="">
<h1>Listing groups</h1>

<% if @groups.empty? %>
    <p>You don't have any groups defined. Why not create one ?</p>
<% end%>
    <div id="images_container">
    <% @groups.each do |group|
       image = group.images.first
    %>
      <div class="image_cell">
            <div class="image_box"><a id="group_link_<%= group.id%>" href="/groups/show/<%= group.id%>"><img src="/pictures/<%= image!=nil ? image.small_file : 'blank.jpg'%>" /></a></div>
            <%=h group.name %><br />
            <%= link_to "Delete", {:controller => 'groups', :action => 'destroy', :id => group.id}, {:confirm => 'Are you sure?', :method => :post, :class=>"delete_link"}%>
      </div>
    <% end %>
    </div>
</div>
<div class="clear"></div>
